<!DOCTYPE html>
<html>
<head>
    <title>验证器</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <meta content="always" name="referrer">
    <meta name="theme-color" content="#2932e1">
</head>
<body>

<div>
    <form action="/wap/index/index" method="post">
        姓名：<input type="text" name="username" value=""/><br/>
        手机：<input type="text" name="mobile" value=""/><br/>
        邮箱：<input type="text" name="email" value=""/><br/>

        <!-- 验证码1 需要开启伪静态，否则因为图片不带index.php 报404 -->
        <div><img src="{:captcha_src()}" alt="captcha" onclick="getCaptcha(this, this.src)"/></div>
        <!-- 验证码2 -->
        <div>{:captcha_img()}</div>
        <div>{$session}</div>


        <!-- 表单令牌 -->
        <input type="hidden" name="__token__" value="{$token}" />

        <input type="submit" name="submit" value="提交">
    </form>
</div>


<script>

    // 验证码
    function getCaptcha(obj, src) {
        obj.src = '/captcha.html' + '?nowtime=' + Math.random();
    }

</script>




</body>
</html>


